<template>

  <div class="row-main">
    <div class="row-block-ddd" v-has="'oemOrderStaticsPower'" :style="{'overflow-x':$store.state.app.screenWidth<992?'scroll':'auto',width:$store.state.app.screenWidth<992?'100%':'1100px'}">
      <div class="row-data">
        <span>订单数：</span><span class="echo">{{ orderCount }}</span>
      </div>
      <div class="row-data">
        <span>销售金额：</span><span class="echo">{{ priceSum }}</span>
      </div>
      <div class="row-data">
        <span>成本：</span><span class="echo">{{ mineCostSum }}</span>
      </div>
      <div class="row-data" style="border-right: none; margin-right: 20px">
        <span>利润：</span><span class="echo">{{ profitForAgentSum }}</span>
      </div>
      <el-button type="primary" round :plain="!isAllOrder?true:false" size="small" @click="changeStatus(true)" v-show="loginName&&roleChar=='OEM_ADMIN'">所有订单</el-button>
      <el-button type="success" round :plain="isAllOrder?true:false" size="small" @click="changeStatus(false)" v-show="loginName&&roleChar=='OEM_ADMIN'">直属订单</el-button>
    </div>
    <el-table :header-cell-style="{ 'background':$store.state.app.tableBgColor,'color':'#606266' }" :data="tableData" tooltip-effect="dark" class="row-main-table"
              @selection-change="handleSelectionChange" v-loading.fullscreen="tableLoading"
              element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(0, 0, 0, 0.2)" ref="table">
      <el-table-column prop="cardNum" label="我方业务号码" align="center" :fixed="$store.state.app.screenWidth<992?true:false" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
          <span :style="{'color':scope.row.dictIsProblemOrder==='C_YES'?'red':''}">{{ scope.row.cardNum }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="loginName" label="代理账号" align="center" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
          <span :style="{'color':scope.row.dictIsProblemOrder==='C_YES'?'red':''}">{{ scope.row.loginName }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="customerNickName" label="C端用户" align="center" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
            <span
              :style="{'color':scope.row.dictIsProblemOrder==='C_YES'?'red':''}">{{ scope.row.customerNickName }}</span>
        </template>
      </el-table-column><!--el-table-column(-->
      <el-table-column v-if="checkPer('orderCtrl')&&(roleChar=='OEM_ADMIN'||roleChar=='OEM_OTHER')" prop="transactionId" label="支付流水号" align="center" width="$store.state.app.screenWidth<992?'150px':'240px'">
        <template slot-scope="scope">
          <span :style="{'color':scope.row.dictIsProblemOrder==='C_YES'?'red':''}">{{ scope.row.transactionId }}</span>
        </template>
      </el-table-column>

      <el-table-column prop="insertTime" label="提交时间" align="center" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
          <span :style="{'color':scope.row.dictIsProblemOrder==='C_YES'?'red':''}">{{ scope.row.insertTime }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="dictPayTunnelName" label="付款通道" align="center" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
            <span
              :style="{'color':scope.row.dictIsProblemOrder==='C_YES'?'red':''}">{{ scope.row.dictPayTunnelName }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="price" label="现金" align="center" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
          <span :style="{'color':scope.row.dictIsProblemOrder==='C_YES'?'red':''}">{{ scope.row.price }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="oemCost" label="成本" align="center" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
          <span :style="{'color':scope.row.dictIsProblemOrder==='C_YES'?'red':''}">{{ scope.row.oemCost }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="profitForAgent" label="利润" align="center" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
          <span :style="{'color':scope.row.dictIsProblemOrder==='C_YES'?'red':''}">{{ scope.row.profitForAgent }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="setMealName" label="套餐" align="center" width="130px" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
          <span :style="{'color':scope.row.dictIsProblemOrder==='C_YES'?'red':''}">{{ scope.row.setMealName }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="amount" label="连续充值次数" align="center" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
          <span v-if="scope.row.amount&&scope.row.amount>0">{{ scope.row.amount }} 次</span>
          <span v-else>--</span>
        </template>
      </el-table-column>
      <el-table-column prop="dictIsPreStorageName" label="次月生效" align="center" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
            <span
              :style="{'color':scope.row.dictIsProblemOrder==='C_YES'?'red':''}">{{ scope.row.dictIsPreStorageName }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="isHide" label="订单是否已隐藏" align="center" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
          <span :style="{'color':scope.row.isHide==='C_YES'?'red':''}" v-if="scope.row.isHide=='C_YES'">已隐藏</span>
          <span :style="{'color':scope.row.isHide==='C_YES'?'red':''}" v-if="scope.row.isHide!='C_YES'">未隐藏</span>
        </template>
      </el-table-column>
      <el-table-column prop="dictStatusName" label="状态" align="center" :width="$store.state.app.screenWidth<992?'130px':'auto'">
        <template slot-scope="scope">
          <span :style="{'color':scope.row.dictIsProblemOrder==='C_YES'?'red':''}">{{ scope.row.dictStatusName }}</span>
        </template>
      </el-table-column>
      <el-table-column v-has="'orderCtrl'" prop="dictStatus" label="操作" align="center">
        <template slot-scope="scope">
          <el-dropdown trigger="click">
            <div>
              <svg-icon class="el-dropdown-link" icon-class="operation"></svg-icon>
            </div>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>
                <el-button class="operation" type="text" v-has="'oprationStatusPer'" @click="showDiolog(scope.row.id)">修改状态</el-button>
              </el-dropdown-item>
              <el-dropdown-item>
                <el-button class="operation" type="text" v-has="'refundPer'" @click="refundMethod(scope.row)">退款</el-button>
              </el-dropdown-item>
              <el-dropdown-item>
                <el-button class="operation" type="text" v-has="'retryPer'" @click="refreshOrderDialog(scope.row)" v-preventReClick>重试</el-button>
              </el-dropdown-item>
              <el-dropdown-item>
                <el-button class="operation" type="text" v-has="'retryPer'" @click="retryFunds(scope.row)" v-preventReClick>重试返佣</el-button>
              </el-dropdown-item>
              <el-dropdown-item>
                <el-button class="operation" type="text" v-has="'deleteOrderFlowPer'" @click="deleteOrderFlow(scope.row.id)" v-preventReClick>删除订单流量</el-button>
              </el-dropdown-item>
              <el-dropdown-item>
                <el-button class="operation" type="text" v-has="'retryPer'" @click="editeOrderNo(scope.row)" v-preventReClick>修改支付流水号</el-button>
              </el-dropdown-item>
              <el-dropdown-item>
                <el-button class="operation" type="text" v-has="'retryPer'" @click="showRemarkDialogFun(scope.row)" v-preventReClick >查看备注</el-button>
              </el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </template>
      </el-table-column>
    </el-table>
    <div :style="{'overflow-x': $store.state.app.screenWidth<992?'scroll':'none'}">
      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
                     :current-page.sync="currentPage" :page-size="pageSize" class="row-main-pager"
                     layout="total, sizes, prev, pager, next, jumper" :total="totalPage" :page-sizes="[10,20,50,100]"
                     background></el-pagination>
    </div>
    <el-dialog title="订单备注"  top="33vh" :visible.sync="showRemarkDialog" width="40%" center>
      <div style="height: 20vh;overflow-y: scroll">
        <el-table :data="orderRemarkList" :header-cell-style="{ 'background':$store.state.app.tableBgColor,'color':'#606266' }" v-loading.fullscreen="orderRemarkLoading"
                  element-loading-text="数据加载中" element-loading-spinner="el-icon-loading"
                  element-loading-background="rgba(0, 0, 0, 0.2)">
          <el-table-column type="index" label="序号" width="150" align="center"></el-table-column>
          <el-table-column property="mark" label="备注信息" align="center">
            <template slot-scope="scope">
              <el-tooltip class="item" effect="dark" :content="scope.row.mark" placement="top">
                <span style="white-space:nowrap;  overflow: hidden;  text-overflow: ellipsis;">{{ scope.row.mark }}</span>
              </el-tooltip>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="showRemarkDialog = false">关  闭</el-button>
      </span>
    </el-dialog>
    <el-dialog title="退款※高风险操作※" top="33vh" :visible.sync="refundDialog" :append-to-body="true" width="40%"><span
      style="display: flex; color:red;justify-content: left;">操作需谨慎！！！！</span><span
      style="display: flex; justify-content: center;margin-top:10px">
      <el-form class="demo-ruleForm" :model="refundForm" :rules="refundRules" ref="ruleForm" label-width="100px">
        <el-form-item label="退款比例" prop="proportion" type="number" min="0" max="100">
          <el-input v-model="refundForm.proportion"></el-input>
        </el-form-item>
        <el-form-item label="退佣金比例" prop="backUserProportion" type="number" min="0" max="100">
          <el-input v-model="refundForm.backUserProportion"></el-input>
        </el-form-item>
      </el-form></span><span class="dialog-footer" slot="footer">
      <el-button @click="refundDialog= false" size="small">取 消</el-button>
      <el-button type="primary" @click="customerRefund" size="small" v-preventReClick>确 定</el-button></span>
    </el-dialog>
    <el-dialog title="修改订单状态※高风险操作※" top="33vh" :visible.sync="chageStatusDialog" :append-to-body="true" width="40%">
      <span style="display: flex; color:red;justify-content: left;">操作需谨慎！！！！</span><span
      style="display: flex; justify-content: center;margin-top:10px">
      <el-radio-group v-model="status" size="small">
        <el-radio label="1" border>待充送</el-radio>
        <el-radio label="2" border>已付款</el-radio>
        <el-radio label="3" border>待付款</el-radio>
        <el-radio label="4" border>次月生效</el-radio>
        <el-radio label="5" border>本月生效</el-radio>
        <el-radio label="6" border>退款成功</el-radio>
      </el-radio-group></span><span class="dialog-footer" slot="footer">
      <el-button @click="chageStatusDialog = false" size="small">取 消</el-button>
      <el-button type="primary" @click="updateStatus" size="small" v-preventReClick>确 定</el-button></span></el-dialog>
    <el-dialog title="修改支付流水号" :visible.sync="showEditeOrderNoDialogue" width="500px">
      <el-form :model="form" ref="form">
        <el-form-item label="支付流水号" label-width="100px" prop="transactionId" :rules="[
        { required: true, message: '支付流水号不能为空', trigger: 'blur'},
        // { pattern: /^\+?[1-9][0-9]*$/, message: '支付流水号只能输入数字，并且非0开头', trigger: 'blur'  },
      ]">
          <el-input v-model="form.transactionId"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="showEditeOrderNoDialogue = false">取 消</el-button>
        <el-button type="primary" @click="saveOrderNo('form')">确 定</el-button>
      </div>
    </el-dialog>
  </div>


</template>

<script>
import {
  updateOrderStatus,
  refreshOrder,
  orderManagement,
  customerOrderStatistics,
  deleteOrderFlow,
  customerRefundForPrice,
  updateTransactionId,
  backUserMoneyByOrderId,
  orderRefundCheck,
  selectOrderAllRemark
} from '@/api/getData'

export default {
  name: "index",
  data() {
    return {
      flag: false,
      chageStatusDialog: false,
      displayAgentNameFlag: false,
      maxPage: 1,
      tableData: [],
      currentPage: 1,
      tableLoading: true,
      value: false,
      nickName: '',
      accountSelect: [],
      setMealHeadSelect: [],
      setMealSelect: [],
      refundDialog: false,
      refundForm: {
        proportion: 100,
        backUserProportion: 100,
        customerOrderId: null,
        refund: ''
      },
      refundRules: {
        proportion: [{required: true, message: '请输入退款比例', trigger: 'blur'}],
        backUserProportion: [{required: true, message: '请输入退佣金比例', trigger: 'blur'}]
      },
      dictStatusSelect: [
        {
          value: '',
          label: '请选择'
        },
        {
          value: 'USER_ORDER_WAIT_PAY',
          label: '等待付款'
        },
        {
          value: 'USER_ORDER_HAVE_PAY',
          label: '已经付款'
        },
        {
          value: 'USER_ORDER_WAIT_GIVE',
          label: '待充送'
        }
      ],
      dictPayTunnel: '',
      specifications: '',
      price: '',
      setMealName: '',
      channelCompayName: '',
      cost: '',
      totalReturn: '',
      profit: '',
      totalPage: 0,
      pageSize: 10,
      profitForAgentSum: '--',
      mineCostSum: '--',
      priceSum: '--',
      orderCount: '--',
      status: null,
      changeId: null,
      pagekey: '',
      form: {
        id: '',
        transactionId: ''
      },
      showEditeOrderNoDialogue: false,
      orderRemarkLoading: false,
      showRemarkDialog: false,
      isAllOrder: true,
      orderRemarkList: [],
    }
  },
  created() {
    this.initData()
  },
  methods: {
    async showRemarkDialogFun(row){
      this.showRemarkDialog = true;
      this.orderRemarkList = [];
      this.orderRemarkLoading = true;
      let orderRemarkList = await selectOrderAllRemark({id: row.id});
      if(orderRemarkList.data){
        orderRemarkList.data.map(item=>{
          this.orderRemarkList.push(item);
        })
      }
      this.orderRemarkLoading = false;
    },
    changeStatus(status) {
      this.isAllOrder = status;
      this.$emit('isAll', this.isAllOrder);
      this.initData();
    },
    async initData() {
      let startTime = null
      let endTime = null
      if (this.insertTime !== '' && this.insertTime != null) {
        startTime = this.insertTime[0];
        endTime = this.insertTime[1];
      }
      this.tableLoading = true;
      const returnData = await orderManagement({
          beginTime: startTime,
          endTime: endTime,
          cardNum: this.cardNum,
          loginName: this.loginName,
          dictStatus: this.dictStatus,
          accountId: this.accountId,
          setMealHeadId: this.setMealHeadId,
          setMealId: this.setMealId,
          dictIsPreStorage: this.dictIsPreStorage,
          transactionId: this.transactionId,
          amount: this.rechargeAmount,
          isAllOrder: this.isAllOrder,
          page: {
            current: this.currentPage + '',
            size: this.pageSize + '',
            ascs: this.ascs,
            descs: this.descs
          }
        },
        {
          obj: this,
          key: 'tableLoading'
        })
      this.tableData = []
      if (returnData._result) {
        this.maxPage = Math.ceil(returnData.data.total / this.pageSize) // 分页的最大页数
        this.totalPage = returnData.data.total
        returnData.data.records.map(item => {
          const obj = {}
          obj.pid = item.pid
          obj.dictIsProblemOrder = item.dictIsProblemOrder
          obj.cardNum = item.cardNum // 我方业务号码
          obj.payTime = item.payTime
          obj.cardId = item.cardId//卡id
          obj.channelCompanyId = item.channelCompanyId//渠道公司
          obj.setMealId = item.setMealId//套餐id
          obj.customerId = item.customerId//C端客户id
          obj.page = item.page
          obj.applyEndDate = item.applyEndDate
          obj.remark = item.remark
          obj.applyBeginDate = item.applyBeginDate
          obj.userId = item.userId//当前登录用户
          obj.dictStatusName = item.dictStatusName//状态名
          obj.dictStatus = item.dictStatus // 状态
          obj.agentName = item.agentName//代理名称
          obj.oemId = item.oemId//所属oemid
          obj.apiNickname = item.apiNickname
          obj.nickName = item.nickName
          obj.accountId = item.accountId
          obj.list = item.list
          obj.dictIsPreStorageName = item.dictIsPreStorageName
          obj.dictIsPreStorage = item.dictIsPreStorage
          obj.customerOrderDetailList = item.customerOrderDetailList
          obj.channelCompayName = item.channelCompayName
          obj.totalReturn = item.totalReturn
          obj.price = item.price
          obj.dictPayTunnel = item.dictPayTunnel
          obj.setMealName = item.setMealName
          obj.cardNum = item.cardNum
          obj.cost = item.cost
          obj.exceptionMsg = item.exceptionMsg
          obj.singlePrice = item.singlePrice
          obj.profitForAgent = item.profitForAgent
          obj.profitId = item.profitId
          obj.transactionId = item.transactionId
          obj.lastFlowId = item.lastFlowId
          obj.currentAmount = item.currentAmount
          obj.amount = item.amount
          obj.sale = item.sale
          obj.detailList = item.detailList
          obj.payMoney = item.payMoney
          obj.dictMealType = item.dictMealType
          obj.id = item.id
          obj.insertTimeDate = item.insertTimeDate
          obj.insertTime = item.insertTime
          obj.insertTimeTime = item.insertTimeTime
          obj.agentName = item.agentName
          obj.dictPayTunnel = item.dictPayTunnel
          obj.dictPayTunnelName = item.dictPayTunnelName
          obj.customerNickName = item.nickName
          /*     if (item.dictStatus === 'USER_ORDER_WAIT_PAY') {
                 obj.dictStatus = '等待付款'
               } else if (item.dictStatus === 'USER_ORDER_HAVE_PAY') {
                 obj.dictStatus = '已经付款'
               } else if (item.dictStatus === 'USER_ORDER_WAIT_GIVE') {
                 obj.dictStatus = '待充送'
               }*/
          obj.loginName = item.loginName
          obj.oemCost = item.oemCost
          obj.isHide = item.isHide;
          this.tableData.push(obj)
        })
      }
      this.tableLoading = false
      this.countTotal();
    },
    //点击行尾退款
    refundMethod(obj) {
      this.refundDialog = true;
      this.refundForm.customerOrderId = obj.id
    },
    async countTotal() {
      let startTimeForStatistics = null
      let endTimeForStatistics = null
      if (this.insertTime !== '' && this.insertTime != null) {
        startTimeForStatistics = this.insertTime[0]
        endTimeForStatistics = this.insertTime[1]
      }
      this.profitForAgentSum = ""
      this.mineCostSum = ""
      this.priceSum = ""
      this.orderCount = ""
      const returnData = await customerOrderStatistics({
        beginTime: startTimeForStatistics,
        endTime: endTimeForStatistics,
        cardNum: this.cardNum,
        loginName: this.loginName,
        dictStatus: this.dictStatus,
        accountId: this.accountId,
        setMealHeadId: this.setMealHeadId,
        setMealId: this.setMealId,
        dictIsPreStorage: this.dictIsPreStorage,
        transactionId: this.transactionId,
        amount: this.rechargeAmount,
        isAllOrder: this.isAllOrder
      })
      if (returnData._result) {
        if (returnData.data != null) {
          this.profitForAgentSum = returnData.data.profitForAgentSum
          this.mineCostSum = returnData.data.mineCostSum
          this.priceSum = returnData.data.priceSum
          this.orderCount = returnData.data.orderCount
        }
      }
    },
    handleSelectionChange(val) {
      this.multipleSelection = val
    },
    handleSizeChange(val) {
      //console.log(`每页 ${val} 条`)
      this.pageSize = val
      this.initData()
    },
    handleCurrentChange(val) {
      //console.log(`当前页: ${val}`)
      this.currentPage = val
      this.initData()
    },
    handleClose(done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done()
        })
        .catch(_ => {
        })
    },
    async showDiolog(id) {
      this.changeId = id;
      this.chageStatusDialog = true;
      this.pagekey = await this.$getPageKey()
    },
    async updateStatus() {
      if (this.status == null) {
        this.$message.error("请选择更改的状态!")
        return
      }

      await updateOrderStatus({id: this.changeId, dictStatus: this.status}, {
        pagekey: this.pagekey
      }).then(v => {
        this.chageStatusDialog = false;
        if (v._result) {
          this.$message.success("更改成功!");
          this.initData()
        }
      })

    },
    async refreshOrderDialog(item) {
      if(item.isHide=='C_YES'){
        this.$message.error('当前订单隐藏状态下不支持重试返佣功能');
        return false;
      }
      let pagekey = await this.$getPageKey();
      this.$confirm('重试后会为此卡添加流量！确认重新刷新么！', '刷新※高风险操作※', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        refreshOrder({id: item.id}, {pagekey}).then(v => {
          backUserMoneyByOrderId({id: item.id}).then(v => {
            if (v.code === 10000) {
              this.$message.success("操作成功!")
            }
            this.initData()
          })
        })
      }).catch(() => {

      });
    },
    async deleteOrderFlow(id) {
      let pagekey = await this.$getPageKey();
      deleteOrderFlow({id}, {pagekey}).then(v => {
        if (v._result) {
          this.$message.success("操作成功!")
        }
      })
    },
    async customerRefund() {
      let check = await orderRefundCheck({id:this.refundForm.customerOrderId});
      if(check._result){
        let tipText = '';
        if(check.data.isThirdFlag){
          tipText = '该订单为第三方订单，'
        }
        if(check.data.notFindDueTime){
          tipText = '该订单未检索到有效期，'
        }
        if(check.data.errorMessage==''||check.data.errorMessage==undefined){
          if(tipText!=''){
            this.$confirm(`${tipText}是否继续对当前订单执行退款？`, '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning'
            }).then(() => {
              this.doRefundOrder()
            }).catch(() => {

            });
          }
          else if(tipText==''){
            this.doRefundOrder()
          }
        }
        else if(check.data.errorMessage!=''&&check.data.errorMessage!=undefined){
          this.$alert(`${tipText}${check.data.errorMessage}`, '提示', {
            confirmButtonText: '确定',
            callback: action => {
              this.refundDialog = false;
            }
          });
        }
      }
    },
    async doRefundOrder(){
      let pagekey = await this.$getPageKey();
      this.$confirm('确认退款么?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        customerRefundForPrice(this.refundForm, {pagekey}).then(v => {
          this.refundDialog = false;
          if (v._result) {
            this.$message.success("请到退款记录中查看")
          }
        })
      }).catch(() => {

      });
    },
    editeOrderNo(item) {
      this.showEditeOrderNoDialogue = true;
      this.form.transactionId = item.transactionId;
      this.form.id = item.id;
    },
    saveOrderNo(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          updateTransactionId(this.form).then(res => {
            this.showEditeOrderNoDialogue = false;
            this.initData()
          });

        } else {
          return false;
        }
      });
    },
    retryFunds(item) {
      if(item.isHide=='C_YES'){
        this.$message.error('当前订单隐藏状态下不支持重试返佣功能');
        return false;
      }
      this.$confirm('1.待付款状态的订单无法重试。2.该笔订单存在返佣记录的无法重试。', '刷新※高风险操作※', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        backUserMoneyByOrderId({id:item.id}).then(v => {
          if (v.code === 10000) {
            this.$message.success("操作成功!")
          }
          this.initData()
        })
      }).catch(() => {

      });
    }
  },
  props: {
    cardNum: {
      type: String,
      default: ''
    },
    rechargeAmount: {
      type: Number,
      default: null
    },
    loginName: {
      type: String,
      default: ''
    },
    dictStatus: {
      type: String,
      default: ''
    },
    insertTime: {
      type: String,
      default: ''
    },
    accountId: {
      type: String,
      default: ''
    },
    setMealHeadId: {
      type: String,
      default: ''
    },
    setMealId: {
      type: String,
      default: ''
    },
    transactionId: {
      type: String,
      default: ''
    },
    dictIsPreStorage: {
      type: String,
      default: ''
    },
    roleChar: {
      type: String,
      default: ''
    }
  }
}
</script>

<style scoped lang="scss">
.row-block-ddd {
  height: 35px;
  line-height: 35px;
  /*margin: 0 calc(50% - 400px);*/
  position: relative;
  font-size: 14px;
  display: flex;
  justify-content: center;
}

.row-data {
  min-width: 200px;
  position: relative;
  border-right: 1px solid #ebebeb;
  display: inline-flex;
  justify-content: center;

  .echo {
    color: var(--lightBg) !important;
  }
}

</style>
